package redis

import (
	log "github.com/sirupsen/logrus"
	"gopkg.in/redis.v5"
)

func Init() *redis.Client  {
	client := redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "", // no password set
		DB:       0,             // use default DB
	})
	_, err := client.Ping().Result()
	if err != nil {
		log.Error(err)
	}
	return client
}